import pytest


@pytest.mark.xfail
def test_d():
    print("test_d")
    raise Exception("异常")


@pytest.mark.xfail(reason="异常了")
def test_c():
    print("test_c")
    raise Exception("异常")


@pytest.mark.xfail(raises=RuntimeError)
def test_b():
    print("---test_b")
    raise RuntimeError("运行时异常")


@pytest.mark.xfail(raises=RuntimeError)
def test_a():
    print("---test_a")
    raise Exception("异常")
